class Shop {
  private _name: string

  //只读属性
  private readonly _id: number = 0

  public set name(value: string) {
    this._name = value
  }

  public get name(): string {
    return this._name
  }

  constructor(name: string) {
    this._name = name
  }

  static getClass() {
    console.log("getClass")
  }
}

/**
 * 对象展开
 */
export function testExpandObject() {
  let obj1 = { name: 'Alice', age: 10 };
  let obj2 = { ...obj1, sex: 1 }

  console.log("testExpandObject", obj2.name)

}




